
for i in range(1, 10000):
    s = ''
    for j in range(1, 10):
        s += str(i * j)
        if len(s) >= 9:
            break
    if len(s) == 9 and '0' not in s and len(set(s)) == 9:
        print i, j, s